package qingongjianxue;

public class Jisuan {
	double money;
	static double shui=0.03;
	double zongji;
	Student s;
	Score ss;
	Jisuan(Student s,Score ss){
		this.s = s;
		this.ss = ss;
	}
	public void jisuan(){
		for(int i=0;i<ss.Sco.size();i++) {
			String a = (String)ss.Sco.get(i);
			if (a.equals("优")) {
				money+=ss.L.excellent;}
			if (a.equals("良")) {
				money+=ss.L.good;}
			if (a.equals("中")) {
				money+=ss.L.medium;}
			if (a.equals("差")) {
				money+=ss.L.low;}
		}
		zongji = money-money*shui;
		String all = " ";
		for(int i=0;i<ss.Nam.size();i++) {
			all+=(String)ss.Nam.get(i)+"、";
		}
		all=all.substring(0,all.length()-1);
		s.show(money,zongji,all);
}
}